//
//  main.m
//  Day6homework
//
//  Created by dllo on 16/5/10.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    // 第一题 用函数实现 : 随机产生20个[10 , 100]的正整数,输出这些 数以及他们中的最大数
    
//    suiji();
//    shuixianhua();
//    three();
//    int n = 0;
//    printf("请输入一个数字\n");
//    scanf("%d",&n);
//    panduan(n);
    //第六题
    /*
    printf("请输入a,b,c三个数,分别用逗号隔开\n");
    int a = 0, b = 0, c = 0;
    scanf("%d,%d,%d", &a, &b, &c);
    double x = fangcheng(a, b, c);
    printf("%lf,", x);
    printf("%d\n", fangcheng2(a, b, c));
    */
    //第七题
    
    //第八题
    /*
    int a[10] = {5, 4, 8, 7, 2, 6, 15, 44, 9, 23};
    maopao(a, 10);
    for (int i = 0; i < 10; i++) {
        printf("%d,",a[i]);
    }
    */
    
    
    
    
    return 0;
}
int suiji() {
    int s = 0;
    int max = 0;
    for (int i = 0; i < 20; i++) {
        s = arc4random() % (100 - 20 + 1) + 20;
        printf("%d,", s);
        max = max > s ? max : s;
    }
    printf("\n最大数为:%d\n", max);
    return 0;
}